package top.yangyitao.model;

public class JsonChess {
	private int flag;
	private int y;
	@Override
	public String toString() {
		return "JsonChess [flag=" + flag + ", y=" + y + ", x=" + x + "]";
	}
	public int getFlag() {
		return flag;
	}
	public void setFlag(int flag) {
		this.flag = flag;
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
	}
	private int x;
	public JsonChess(String chessJson) {
		String[] data = chessJson.split(",");
		flag = Integer.parseInt(data[0].split(":")[1]);
		y = Integer.parseInt(data[1].split(":")[1]);
		x = Integer.parseInt(data[2].split(":")[1]);
	}
	public JsonChess() {
		super();	
	}
}
